<table class="table table-hover">
	<tr style="background-color: none;">
		<td></td>
		<td><button class="btn btn-primary btn-lg" onClick="addOrModifyEmployeeEducation({{employeeid}},0)">_('enter new education')</button></td>
	</tr>
	{{#employeeeducation}}
	<tr id="employeeeducationid_{{employeeeducationid}}">
	<td>
		{{#employeeeducationfacultytitle}}
			_('employeeeducationfacultytitle'){{employeeeducationfacultytitle}}<br>
		{{/employeeeducationfacultytitle}}
		{{#employeeeducationgraduatedate}}
			_('employeeeducationgraduatedate'){{employeeeducationgraduatedate}}
		{{/employeeeducationgraduatedate}}
		{{#employeeeducationdepartment}}
			_('employeeeducationdepartment'){{employeeeducationdepartment}}
		{{/employeeeducationdepartment}}
		{{#employeeeducationscienceinteresttitle}}
			_('employeeeducationscienceinteresttitle'){{employeeeducationscienceinteresttitle}}
		{{/employeeeducationscienceinteresttitle}}
	</td>
	<td>
		<button type="button" class="btn" onClick="addOrModifyEmployeeEducation({{employeeid}}, {{employeeeducationid}})">_('more')</button>
	</td>
	</tr>
	{{/employeeeducation}}
</table>
<div id="employeeeducationedit_dialog" title="_('employee education edit')">
</div>
<script>
function addOrModifyEmployeeEducation(employeeid, employeeeducationid)
{
	console.log('addOrModifyEmployeeEducation ' + employeeid + ' ' + employeeeducationid);
	var employeeeducation = {}
	for(i = 0; i < g_currentEmployee['employeeeducation'].length; i++)
	{
		if(employeeeducationid == g_currentEmployee['employeeeducation'][i].employeeeducationid)
		{
			employeeeducation = g_currentEmployee['employeeeducation'][i];
			break;
		}
	}
	$.get('/static/js/templates/employeeeducation_edit.html', function(template)
	{
	  var rendered = Mustache.render(template, employeeeducation);
	  $('#employeeeducationedit_dialog').html(rendered);
	  $('#employeeeducationedit_dialog').dialog({height: 400, width: 600});	  
	}).fail(function(e){console.log(e);});

}
</script>